Navigating performance data from different subsystems

ABSTRACT

Performance data can be collected from different runtime environment subsystems of a computer system while the computer system is running a program in the runtime environment. A visualization model can be displayed, and a visual query of the integrated data can be received at the visualization model. Queried data can be compiled and displayed in response to the visual query. The queried data can be drilled into in response to user input. In response to a navigation request, navigation can lead to a programming element related to a portion of the queried data.

RELATED APPLICATIONS

This application claims priority to U.S. Provisional Patent ApplicationNo. 61/474,509, filed Apr. 12, 2011, entitled NAVIGATING PERFORMANCEDATA FROM DIFFERENT SUBSYSTEMS, which is incorporated herein byreference.

BACKGROUND

Computer runtime environments can host programs while the programs arerunning. For example, a runtime environment may be a virtual environmentrunning in a host computer system. Runtime environments can includemultiple subsystems having different mechanisms for performing a varietyof tasks.

Profilers are computing tools that are used to collect performanceinformation about running computer programs and present the collectedinformation to a user. This is typically done with a profiler componentthat runs at the same time as a computer program to collect performancedata for the computer program. The profiler can present such collectedinformation to a developer to provide the developer with informationabout the performance of the running program.

SUMMARY

The descriptions below relate to tools and techniques for navigatingintegrated performance data from different runtime environmentsubsystems and arriving at a programming element (i.e., a component ofthe computer program that can be modified by user input from a programdeveloper, such as scripts, source code, etc.). As used herein,different runtime environment subsystems are different types ofsubsystems of a runtime environment, which is an environment in which aprogram is run. For example, different subsystems could include agraphics subsystem, a user code execution subsystem, a media decodingsubsystem, a networking subsystem, and an overall programmingenvironment (an operating system abstraction layer that manages alifetime of a running program). Of course, there can also be otherdifferent subsystems. For example, an operating system itself could beanother example of a different subsystem if the scope of a system beingprofiled were to include the operating system.

Navigation of performance data may include displaying a visualizationmodel and performing visual queries of the performance data. Avisualization model is a model that includes graphical datarepresentations (e.g., data graphs), and may also include otherrepresentations, such as textual representations (e.g., tabular data). Avisual query is a query that is initiated in response to user inputdirected at and selecting a displayed visual element (graphical element,textual element, combined graphical/textual element, etc.).

In one embodiment, the tools and techniques can include collectingperformance data from different runtime environment subsystems of acomputer system while the computer system is running a program in theruntime environment. A visualization model can be displayed, and avisual query of the integrated data can be received at the visualizationmodel. Queried data can be compiled in response to the visual query. Inresponse to user input, the tools and techniques can include drillingdown into the queried data. In response to a navigation request, thetools and techniques can include navigating to a programming elementrelated to a portion of the queried data.

This Summary is provided to introduce a selection of concepts in asimplified form. The concepts are further described below in theDetailed Description. This Summary is not intended to identify keyfeatures or essential features of the claimed subject matter, nor is itintended to be used to limit the scope of the claimed subject matter.Similarly, the invention is not limited to implementations that addressthe particular techniques, tools, environments, disadvantages, oradvantages discussed in the Background, the Detailed Description, or theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a suitable computing environment in whichone or more of the described embodiments may be implemented.

FIG. 2 is a schematic diagram of a performance data navigation system.

FIG. 3 is an illustration of an example of a visualization modeldisplay.

FIG. 4 is an illustration of the visualization model display of FIG. 3,but including an issues table.

FIG. 5 is an illustration of the visualization model display of FIG. 4,but with the issues table replaced by a threadwise functions table.

FIG. 6 is a flowchart of a technique for navigating performance datafrom different subsystems.

FIG. 7 is flowchart of another technique for navigating performance datafrom different subsystems.

FIG. 8 is a flowchart of yet another technique for navigatingperformance data from different subsystems.

DETAILED DESCRIPTION

Embodiments described herein are directed to techniques and tools forimproved navigating of integrated performance data from differentruntime environment subsystems. Such improvements may result from theuse of various techniques and tools separately or in combination.

Such techniques and tools may include presenting an interactivevisualization model for integrated data from various subsystems. Thevisualization model can allow users to visually query the data, navigateacross queried data, and drill down into the data to reveal additionalinformation about a performance problem. As used herein, a performanceproblem or performance issue is a condition where the program'sperformance fails a specified test, benchmark, or rule that is used foridentifying such issues or problems. The model can allow users tonavigate to a programming element related to a portion of the querieddata, such as a programming element that contributes, at least in part,to an identified performance issue.

Accordingly, one or more benefits can be realized from the tools andtechniques described herein. For example, the tools and techniques canprovide a visualization of a performance problem, and can allow adeveloper to drill down in the performance data to reveal moreinformation about the problem, even if that performance data comes fromdifferent runtime subsystems. Additionally, the tools and techniques cancorrelate a performance problem to a programming element, which thedeveloper can edit to address the performance problem.

The subject matter defined in the appended claims is not necessarilylimited to the benefits described herein. A particular implementation ofthe invention may provide all, some, or none of the benefits describedherein. Although operations for the various techniques are describedherein in a particular, sequential order for the sake of presentation,it should be understood that this manner of description encompassesrearrangements in the order of operations, unless a particular orderingis required. For example, operations described sequentially may in somecases be rearranged or performed concurrently. Moreover, for the sake ofsimplicity, flowcharts may not show the various ways in which particulartechniques can be used in conjunction with other techniques.

Techniques described herein may be used with one or more of the systemsdescribed herein and/or with one or more other systems. For example, thevarious procedures described herein may be implemented with hardware orsoftware, or a combination of both. For example, dedicated hardwareimplementations, such as application specific integrated circuits,programmable logic arrays and other hardware devices, can be constructedto implement at least a portion of one or more of the techniquesdescribed herein. Applications that may include the apparatus andsystems of various embodiments can broadly include a variety ofelectronic and computer systems. Techniques may be implemented using twoor more specific interconnected hardware modules or devices with relatedcontrol and data signals that can be communicated between and throughthe modules, or as portions of an application-specific integratedcircuit. Additionally, the techniques described herein may beimplemented by software programs executable by a computer system. As anexample, implementations can include distributed processing,component/object distributed processing, and parallel processing.Moreover, virtual computer system processing can be constructed toimplement one or more of the techniques or functionality, as describedherein.

I. Exemplary Computing Environment

FIG. 1 illustrates a generalized example of a suitable computingenvironment (100) in which one or more of the described embodiments maybe implemented. For example, one or more such computing environments canhost the program and/or profiler component(s) discussed herein.Generally, various different general purpose or special purposecomputing system configurations can be used. Examples of well-knowncomputing system configurations that may be suitable for use with thetools and techniques described herein include, but are not limited to,server farms and server clusters, personal computers, server computers,hand-held or laptop devices, multiprocessor systems,microprocessor-based systems, programmable consumer electronics, networkPCs, minicomputers, mainframe computers, distributed computingenvironments that include any of the above systems or devices, and thelike.

The computing environment (100) is not intended to suggest anylimitation as to scope of use or functionality of the invention, as thepresent invention may be implemented in diverse general-purpose orspecial-purpose computing environments.

With reference to FIG. 1, the computing environment (100) includes atleast one processing unit (110) and at least one memory (120). In FIG.1, this most basic configuration (130) is included within a dashed line.The processing unit (110) executes computer-executable instructions andmay be a real or a virtual processor. In a multi-processing system,multiple processing units execute computer-executable instructions toincrease processing power. The at least one memory (120) may be volatilememory (e.g., registers, cache, RAM), non-volatile memory (e.g., ROM,EEPROM, flash memory), or some combination of the two. The at least onememory (120) stores software (180) implementing navigation ofperformance data from different subsystems.

Although the various blocks of FIG. 1 are shown with lines for the sakeof clarity, in reality, delineating various components is not so clearand, metaphorically, the lines of FIG. 1 and the other figures discussedbelow would more accurately be grey and blurred. For example, one mayconsider a presentation component such as a display device to be an I/Ocomponent. Also, processors have memory. The inventors hereof recognizethat such is the nature of the art and reiterate that the diagram ofFIG. 1 is merely illustrative of an exemplary computing device that canbe used in connection with one or more embodiments of the presentinvention. Distinction is not made between such categories as“workstation,” “server,” “laptop,” “handheld device,” etc., as all arecontemplated within the scope of FIG. 1 and reference to “computer,”“computing environment,” or “computing device.”

A computing environment (100) may have additional features. In FIG. 1,the computing environment (100) includes storage (140), one or moreinput devices (150), one or more output devices (160), and one or morecommunication connections (170). An interconnection mechanism (notshown) such as a bus, controller, or network interconnects thecomponents of the computing environment (100). Typically, operatingsystem software (not shown) provides an operating environment for othersoftware executing in the computing environment (100), and coordinatesactivities of the components of the computing environment (100).

The storage (140) may be removable or non-removable, and may includecomputer-readable storage media such as magnetic disks, magnetic tapesor cassettes, CD-ROMs, CD-RWs, DVDs, or any other medium which can beused to store information and which can be accessed within the computingenvironment (100). The storage (140) stores instructions for thesoftware (180).

The input device(s) (150) may be a touch input device such as akeyboard, mouse, pen, or trackball; a voice input device; a scanningdevice; a network adapter; a CD/DVD reader; or another device thatprovides input to the computing environment (100). The output device(s)(160) may be a display, printer, speaker, CD/DVD-writer, networkadapter, or another device that provides output from the computingenvironment (100).

The communication connection(s) (170) enable communication over acommunication medium to another computing entity. Thus, the computingenvironment (100) may operate in a networked environment using logicalconnections to one or more remote computing devices, such as a personalcomputer, a server, a router, a network PC, a peer device or anothercommon network node. The communication medium conveys information suchas data or computer-executable instructions or requests in a modulateddata signal. A modulated data signal is a signal that has one or more ofits characteristics set or changed in such a manner as to encodeinformation in the signal. By way of example, and not limitation,communication media include wired or wireless techniques implementedwith an electrical, optical, RF, infrared, acoustic, or other carrier.

The tools and techniques can be described in the general context ofcomputer-readable media, which may be storage media or communicationmedia. Computer-readable storage media are any available storage mediathat can be accessed within a computing environment, but the termcomputer-readable storage media does not refer to propagated signals perse. By way of example, and not limitation, with the computingenvironment (100), computer-readable storage media include memory (120),storage (140), and combinations of the above.

The tools and techniques can be described in the general context ofcomputer-executable instructions, such as those included in programmodules, being executed in a computing environment on a target real orvirtual processor. Generally, program modules include routines,programs, libraries, objects, classes, components, data structures, etc.that perform particular tasks or implement particular abstract datatypes. The functionality of the program modules may be combined or splitbetween program modules in various embodiments. Computer-executableinstructions for program modules may be executed within a local ordistributed computing environment. In a distributed computingenvironment, program modules may be located in both local and remotecomputer storage media.

For the sake of presentation, the detailed description uses terms like“determine,” “choose,” “adjust,” and “operate” to describe computeroperations in a computing environment. These and other similar terms arehigh-level abstractions for operations performed by a computer, andshould not be confused with acts performed by a human being, unlessperformance of an act by a human being (such as a “user”) is explicitlynoted. The actual computer operations corresponding to these terms varydepending on the implementation.

II. Performance Data Navigation System and Environment

Referring now to FIG. 2, a performance data navigation system (200) isillustrated in schematic form. The system (200) can include a profilertool (202), which can be a program module running in the system (200).The profiler tool (202) can receive user input (204), such as user inputrequesting that a runtime environment (210) be launched to run a program(220). For example, the runtime environment (210) may be a nativeenvironment in the system (200). Alternatively, the runtime environment(210) can be a virtual environment that simulates a target environmentin which the program (220) is to be run after the program (220) isdeveloped.

As the program (220) is run in the runtime environment (210), multipledifferent subsystems (230) in the runtime environment (210) can beinvolved in supporting and running the program (220). For example, thesubsystems (230) may include a graphics subsystem (232), a user codeexecution subsystem (234), a media decoding subsystem (236), anetworking subsystem (238), an overall programming environment subsystem(240), and an operating system (242). Alternatively, the operatingsystem (242) may not be considered to be one of the subsystems (230) tobe profiled in some situations, such as where the analysis is to befocused on subsystems other than the operating system (242).

A profiler probe (250) running in the runtime environment (210) cancollect performance data (260) as the program (220) runs. Thisperformance data (260) can be integrated performance data from thedifferent subsystems (230). The profiler probe (250) can communicate theperformance data (260) to the profiler tool (202), which may run outsidethe runtime environment (210), as illustrated. Alternatively, theprofiler tool (202) may run inside the runtime environment (210), andmay also act as the profiler probe (250). For example, the performancedata (260) may be collected in one or more trace log files.

The profiler tool (202) can generate a visualization model (270), andcan display the visualization model (270). The visualization model (270)can be an interactive model, so that user input (204) directed atelements of the model (270) can be passed to the profiler tool (202),and the profiler tool (202) can respond by altering the display of thevisualization model (270). For example, user input (204) may include anindication to navigate (e.g., drill down into, or navigate across) aportion of the performance data (260) that is related to a particularperformance issue represented in the visualization model (270). As anexample, user input (204) may indicate that a programming elementrelated to a performance issue is to be displayed.

An example of navigating performance data from different subsystems willnow be described with reference to FIGS. 3-5. Referring now to FIG. 3, avisualization model display (300) is illustrated. In this example, thevisualization model display (300) includes three graphs (310), eachillustrating performance data values along a timeline (312). Such graphscould be displayed after the underlying data was collected, as discussedabove. A profiler tool can combine and analyze the performance data, andcan use the resulting integrated data to construct the graphs (310). Forexample, the performance data may be collected in one or more tracelogs, and combining and analyzing the data can include combining andanalyzing information from the trace logs. The graphs (310) can includethe following in this example: a top graph of frame rates at differenttimes; a middle graph of CPU usage by different categories, includinguser interface thread, compositor thread, managed threads, runtimethreads, sampling overhead, system, and idle; and a bottom graph ofmemory usage. The graphs (310) can represent data from differentsubsystems that are using resources, such as those subsystems (230)discussed above with reference to FIG. 2. For example, the middle graphof CPU usage can represent CPU usage by multiple different subsystems;the bottom memory usage graph can represent memory usage by multipledifferent subsystems, etc.

The visualization model display (300) can also include navigationfeatures, such as one or more scroll bars and a pointer (320). These andother navigation features can be used to navigate the visualizationmodel display (300), such as by receiving user input in the form ofvisual queries.

As an example of navigation, and referring now to FIG. 4, the pointer(320) may be pointed and dragged in the area of the timeline (312)and/or graphs (310) to indicate a region (330) of the graphs (310)corresponding to a time range along the timeline (312). In response tothis visual query, the profiler tool can analyze the performance datawithin the specified time range to determine whether any performancerules have been broken. For example, performance rules could specifyparameter values and/or coding patterns that warrant raising warnings.For example, as illustrated in FIG. 4, the issues can include “CPU BOUNDANIMATION IN 49 FRAMES”, “CPU BOUND ANIMATION IN 20 FRAMES”, and“FUNCTION FOO CONSUMED 85% OF CPU”. Each of these performance issues isillustrated in a row of a performance issues table (340). Each row alsoindicates the start and end times where the issue occurred, theparameter involved (such as frames per second (FPS), code, etc.), andthe severity according to the specifications of the correspondingperformance rule that was broken. The performance rules may be rulesthat are entered by user input, such as by user input from experiencedprogram developers.

Accordingly, the visualization model display (300) can display to a userwhat the performance issues are within the visual query entered by theuser (in this example a time range), even if those issues would spanmultiple subsystems. As an example, if the function FOO consumed 85percent of the CPU using three different subsystems (e.g., the user codeexecution subsystem, the graphics subsystem, and the media decodingsubsystem), the performance data from those different subsystems can becombined and analyzed to determine whether FOO used more of the CPU thana percentage specified in a performance rule. The issues table (340) mayalso include additional information, such as suggestions as to how theperformance issue can be fixed, if such a suggestion is available. Forexample, a performance issue rule may detect a particular coding patternthat can be detrimental to performance, and the corresponding issuetable row for that entry can include a suggestion as to how the codingpattern may be improved.

User input can be provided to navigate the issues table (340), and todrill down farther into the displayed performance issues. For example, auser may provide user input requesting that the profiling tool drilldown into a selected issue by displaying threadwise functions related toone of the performance issues. For example, the pointer (320) may bemoved over the selected row in the issues table (340), an indicationsuch as a right mouse click may indicate a request to display a menu ofselections, and the pointer (320) can move over and click a menu item todrill down. If the performance issue relates to a particular programmingelement, the menu of selections could include an entry for “VIEWSOURCE”, which can be selected to reveal the programming element, suchas source code if the programming element is written in a source codelanguage.

As another example, the menu of selections may include selections forother information that can be drilled into, such as a menu entry forthreadwise functions. If the threadwise functions entry is selected,that drill-down visual query could result in the profiler tool drillingdown into the selected issue and replacing the issues table (340) with athreadwise functions table (350), as illustrated in FIG. 5.

The threadwise functions table (350) can include a row for eachthreadwise function related to the selected performance issue, and canalso include additional information about that threadwise function, suchas illustrations of performance data related to the threadwise function,an identifier of the thread where that function was running, etc.

Referring still to FIG. 5, the pointer (320) can be moved to a selectedfunction row, and a right click indication can raise a menu ofselections (360) related to the function of the selected row. Forexample, as illustrated, the menu of selections (360) can include anentry “VIEW SOURCE”, which can be selected to produce a display of aprogramming element for the selected function (“FOO” in the illustrationof FIG. 5). The menu of selections (360) is illustrated with just oneentry, but it could include additional entries indicating other ways inwhich the profiler tool can drill into the performance data related tothe entry in response to user input directed at the entry. The displayedprogramming element can be modified by providing user input, and themodified programming element may improve performance of the computerprogram being profiled.

The above discussion of FIGS. 3-5 is provided as a specific example, andit should be appreciated that the techniques and tools discussed hereinare not limited to this example. For example, the tools and techniquescould apply to different display layouts, different graphicalrepresentations of performance data, different types of performanceissues, different techniques for indicating visual queries, etc. Itshould also be appreciated that the techniques described herein may beused for a wide variety of different types of programs, such as programsfor servers, desktop computers, mobile handheld devices, etc.

III. Resource Cost Correlation Across Different Subsystems

Tools and techniques for correlating performance data such as resourcecost data across different subsystems will now be discussed. Alsodiscussed in this section will be analysis that can be performed usingsuch correlations. Such analysis may be used to carry out the queriessuch as visual queries of performance data discussed herein.

A profiler probe running in the runtime environment can collect dataincluding cost data as the program runs. This cost data can beintegrated cost data from the different subsystems. The profiler probecan communicate the cost data to the profiler tool, which may runoutside the runtime environment, as illustrated. Alternatively, theprofiler tool may run inside the runtime environment, and may also actas the profiler probe. As an example, the cost data may be collected inone or more trace log files.

The profiler may use the collected data including the cost data toconstruct one or more model state data structure(s) that can be used tomap items from the cost data to the actual state data structure(s),which can include or be mapped to the programming elements of theprogram. A model state data structure can match a corresponding actualstate data structure. For example, if an actual state data structure isa tree data structure, the matching model state data structure may alsobe a tree data structure.

As an example of constructing a model state data structure, the costdata may be included in an execution trace log file generated whilerunning the program. The cost data and the other collected data in thattrace file can come from multiple different subsystems. The profilerprobe may insert markers in the code of the program, so that suchmarkers trigger events that are recorded in the trace log file. The datafor each such event may include a system clock time (wall clock time)for the event. For example, a log entry for an execution time on aprocessor may include start and/or stop system wall clock times. Forresource usage that is measured in units of time, a log entry may alsoinclude a resource time for the particular trace. For example, the entrymay indicate an amount of execution time on a GPU or CPU. Log entriesmay also include other information, such as the amount of memoryallocated for a particular element corresponding to an element of astate data structure, a frame rate at a particular wall clock time, etc.Because the log file can include such resource usage entries from allthe different subsystems that are to be included in the profile, thoseusages can be combined to reveal the overall resource usage byimperative components being profiled in the runtime environment.

The cost data may also include some unwanted data, such as data fromresource usage by the profiler probe as the probe collects the costdata. Such unwanted cost data may be identified and subtracted out bythe profiler probe and/or the profiler tool. This may be done byactually measuring costs contributed by the profiler probe. However,measuring the costs of the profiler probe may introduce even moreunwanted costs. Accordingly, the unwanted costs may be quantified insome other manner, such as by estimating costs contributed by theprofiler probe. For example, estimates can be based on how many costsamples were taken by the profiler probe and/or based on some otherinformation. Rather than actually subtracting out the costs, informationabout unwanted costs may be presented along with representations of thecost data itself. For example, information on tolerances for the costdata may be presented.

As noted above, the cost data can reveal the costs of the imperativeelements from the runtime environment. However, at least some of thoseimperative elements may not be actual programming elements of theprogram. For example, where the programming elements are declarativeprogramming elements, the subsystems of the runtime environment mayexecute those declarative programming elements by invoking imperativeelements of the runtime environment that specify how tasks identified bythe declarative programming are to be executed. Accordingly, theprofiler tool may include tools that that correspond to designs in theruntime environment, and those tools can identify conditions that wouldhave been caused by the particular runtime environment executingparticular types of declarative programming elements from the program.For example, declarative languages are often exhibited by correspondingengines. Using a knowledge of how an engine works and of a profile oftime taken by particular components in the runtime environment whenrunning the program, a mapping can be generated of what declarativeelements would have caused the time and component profile. Accordingly,tools may be used to construct the model state data structure, which canrepresent a state data structure that could have produced the collecteddata including the cost data.

The model state data structure may include elements that correspond todifferent types of declarative programming elements, and may alsoinclude some elements that correspond to types of imperative programmingelements. Accordingly, the model state data structure(s) can match theactual state data structure(s) that were present when the program wasrunning in the runtime environment. Thus, elements of the model statedata structures, which are already matched to items in the cost data canbe matched to structures in the program that include the programmingelements.

Accordingly, the profiler tool can use the model state data structure(s)to match items in the cost data to the programming elements in theprogram, even when those programming elements are declarative elements.That matching can be used to construct the correlation data structure,which can correlate the cost data for different subsystems and can alsoattribute items in the cost data to the matching programming elements.The cost data for different subsystems may be correlated using timinginformation from the trace log file, which can also be included in thecorrelation data structure. For example, items of the cost dataidentifying memory usage by different subsystems at a particular wallclock time may be combined and summed to reveal an overall memory usagefor that time. The correlation data structure may include one or moretables, such as a table for each type of cost being profiled (e.g., onetable for memory usage, one table for GPU usage, one table for CPUusage, etc.).

As noted above, the correlation data structure can correlate cost datafrom different subsystems. For example, consider a declarativeprogramming element that indicates a text box. The user code executionsubsystem, the graphics subsystem, and the GPU may each have memoryallocated for the text box. Accordingly, to calculate how much memorythe text box programming element is using, information from thedifferent subsystems can be combined. The memory usage by differentsubsystems can be tracked by tracking what objects are allocated by whatother objects. For example, object A may be allocated by the user code,object A may allocate object B, object B may allocate object C, etc. Andthese objects may be allocated in different subsystems. The tracking ofthis allocation can be maintained down to the processor level (e.g.,including memory allocated in the GPU). These allocations from differentsubsystems can then be correlated to the object that was allocated bythe programming element in the memory table. Also, the memory table mayinclude an indication of a subsystem (e.g., user code executionsubsystem, graphics subsystem, GPU subsystem, etc.) from which an itemof memory allocation was derived.

The correlation data structure can include multiple differentsub-structures, such as multiple different tables that can beconstructed from trace file information using knowledge of the design ofthe runtime environment. For example, one table may include a graph thatmaps between different objects from the runtime environment. Forexample, that graph can identify relationships such as parent-childrelationships between the objects. That graph may be used inconstructing the model state data structure(s). Other tables correlateitems of resource usage by time and may attribute each usage item to aprogramming element that was responsible for the usage. For example,tables in the correlation data structure may include a table that mapsmemory usage to objects, a table that maps GPU usage to objects, a tablethat maps CPU usage to objects, etc.

The correlation data structure can be analyzed to provide informationrelated to the costs attributed to the programming elements. Forexample, the profiler tool may apply a series of filters and/oranalyzers to the data in the correlation data structure. This filteringand/or analysis may be done in response to user input.

The analyzers and filters may be applied in various ways. One example ofan analyzer flow will now be discussed. In the analyzer flow, a firstdataset context can include various data items. The first datasetcontext may be an initial dataset context before other filters oranalyzers have been applied, or the first dataset context may bereceived from a previous filter or analyzer. The first dataset contextcan include a first current dataset, which can be a dataset that resultsfrom previous filters and/or analyzers being applied to the cost data inthe correlation data structure. The first dataset context can alsoinclude a first history, which can represent a history of analyzersand/or filters that were already applied to produce the first currentdataset. The first dataset context can also include a base time filter,which can filter the data to be within a specified range of time (suchas a range of system wall clock time). The first dataset context canalso include a correlation data structure, which may be the same as thecorrelation data structure discussed above. The first current dataset,or at least a portion of the first current dataset, may be presented toa user, such as by displaying a representation of at least a portion ofthe first current dataset.

The first dataset context can be provided to a first analyzer, which maybe a component of the profiler tool. For example, this may be done inresponse to receiving user input. The first analyzer can analyze thefirst dataset context to produce a second dataset context, which caninclude an updated second current dataset, and updated second history(which can be updated to indicate that the first analyzer had analyzedthe data), the base time filter, and the correlation data structure. Thesecond current dataset, or at least a portion of the second currentdataset, may be presented to a user, such as by displaying arepresentation of at least a portion of the second current dataset. Thesecond dataset context can be provided to a second analyzer, and thesecond analyzer can analyze the second dataset context to produce athird dataset context. For example, this may be done in response to userinput. The third dataset context can include an updated third currentdataset, an updated third history, the base time filter, and thecorrelation data structure. The third current dataset, or at least aportion of the third current dataset, may be presented to a user, suchas by displaying a representation of at least a portion of the thirdcurrent dataset. This sequence of displaying a current dataset,providing the current dataset to another analyzer, having the analyzeranalyze the dataset context to produce another current dataset, and thendisplaying that current dataset may continue beyond what is specificallydescribed here. For example, the sequence may continue until aprogramming element is identified and displayed so that a user can editthat programming element.

As one example of an analysis, consider a situation where a frame ratedrops too low while the program is running. The low frame rate couldcause a display screen to flicker. Such a low frame rate could be causedby one or more of many things (e.g., other program(s) using too manyresources, the cost of executing the current display screen being toohigh, some other thread in the program using too many resources, etc.).The first analyzer may be able to reveal that between system wall clocktimes t=1 and t=2, the problem resulted from the complexity of a visualtree structure. The second analyzer may be able to analyze between timest=1 and t=2 to determine which programming elements of the visual treestructure are incurring the largest resource costs during that timeperiod. An additional third analyzer (not shown) may be invoked toreveal which animations (which can themselves be programming elements)are causing the properties of those high cost programming elements tochange during this time period. When representations of the animationprogramming elements are displayed as part of a resulting currentdataset from the third analyzer, user input may be provided to click onthe representation of an animation programming element to reveal theanimation programming element itself. The animation programming elementcan then be edited. In each of the levels of analysis, user input may beprovided to drill down further and invoke additional analyzers toassemble and display datasets.

The analyzers can perform various different types of analyses on thecost data. For example, one analyzer may receive data within a specifiedtime period and determine what elements are being modified during thattime. Another analyzer may receive elements that have been modified, andthat analyzer may yield the storyboards that were causing the elementsto be modified. Another analyzer may sort data to see which has thegreatest resource cost (most execution time, most memory, etc.). Adeclarative model may be used by the profiler tool to indicate whatanalyzers are applicable in specified situations. For example, availableanalyzers may be limited to different aspects depending what type ofresource cost or usage is being analyzed and what associatedsub-structure of the correlation data structure will be used (frame ratetable, memory usage table, CPU usage table, GPU usage table, etc.).

IV. Techniques for Navigating Performance Data from Different Subsystems

Several techniques for navigating performance data from differentsubsystems will now be discussed. Each of these techniques can beperformed in a computing environment. For example, each technique may beperformed in a computer system that includes at least one processor andat least one memory including instructions stored thereon that whenexecuted by the at least one processor cause the at least one processorto perform the technique (one or more memories store instructions (e.g.,object code), and when the processor(s) execute(s) those instructions,the processor(s) perform(s) the technique). Similarly, one or morecomputer-readable storage media may have computer-executableinstructions embodied thereon that, when executed by at least oneprocessor, cause the at least one processor to perform the technique.

Referring to FIG. 6, a technique for navigating performance data fromdifferent subsystems will be described. The technique can includecollecting (610) performance data from a plurality of different runtimeenvironment subsystems of a computer system while the computer system isrunning a program in the runtime environment. A visualization modelrepresenting the integrated data can be displayed (620), and a visualquery of the integrated data can be received (630) at the visualizationmodel. Queried data can be compiled (640) in response to the visualquery. For example, compiling (640) can include combining data ofsimilar types, even if the data comes from different subsystems. As anexample, threadwise functions can be combined into a list even if thethreadwise functions stem from different subsystems, so long as thethreadwise functions meet the parameters of the visual query. Thetechnique of FIG. 6 can further include drilling down (650) into thequeried data in response to user input. Additionally, in response to anavigation request directed at the visualization model, the techniquecan include navigating (660) to a programming element related to aportion of the queried data.

Referring still to FIG. 6, receiving (630) the visual query can includereceiving user input directed at a displayed element of thevisualization model. The visualization model may include multipledifferent visualization elements, such as one or more graphsrepresenting quantitative performance data values. The visualizationmodel may also include at least one textual data element displayed alongwith the graph(s). The technique can include navigating across thequeried data, such as by scrolling a table or list of data, or scrollinga graph.

The visual query may be a first visual query, and the queried data maybe a first set of queried data. Drilling down (650) into the first setof queried data can include receiving user input directed at a visualelement representing at least a portion of the queried data. In responseto the user input directed at the visual element, more information aboutperformance data represented by the visual element may be displayed thanhad been displayed previously.

The plurality of subsystems may include a first subsystem and a secondsubsystem, where each of these two subsystems are selected from a groupconsisting of a graphics subsystem, a user code execution subsystem, amedia decoding subsystem, a networking subsystem, an overall programmingenvironment, and combinations thereof. The programming element may be ina declarative programming language. For example, the programming elementmay be in a declarative programming language that allows user interfaceelements to be defined in a declarative manner, such as the XAMLprogramming language. Alternatively, the programming element may be inan imperative programming language.

The navigation request may include user input selecting a visual elementthat represents a set of performance data representing resource usagecaused, at least in part, by the programming element. For example, theprogramming element may be source code for invoking a function, and thefunction may be a function that contributed to resource usage (e.g.,processor or memory usage) represented by the set of performance data.An indication of a type of problem with the programming element may bedisplayed. For example, an analysis of the performance data may reveal apattern that indicates a problem with a particular programming element,and an indication of that problem may be displayed. Such patterns, likeother performance rules discussed herein, may be specified by users suchas experienced program developers.

The queried data may include a list of one or more performance issueswithin parameters indicated by the visual query, such as within a timeperiod indicated by the visual query.

Referring now to FIG. 7, another technique for navigating performancedata from different subsystems will be described. The technique caninclude collecting (710) integrated performance data from a plurality ofdifferent runtime environment subsystems of a computer system while thecomputer system is running a program in the runtime environment. Avisualization model representing the integrated data from the subsystemscan be displayed (720). A visual query can be received (730) at thedisplayed visualization model. Additionally, in response to the query,an analysis of at least a portion of the integrated data meeting one ormore parameters of the visual query can be performed (740). A list ofone or more performance issues identified in the analysis can bedisplayed (750). The technique can also include drilling down (760) intoa performance issue in response to user input selecting the performanceissue from the list. Drilling down (760) can include displaying arepresentation of a programming element related to the performanceissue. The technique can include navigating (770) to the programmingelement in response to user input directed at the representation of theprogramming element.

The visualization model in the technique of FIG. 7 can include one ormore graphs, and the model may also include one or more textual dataelements displayed along with the graph(s). The graph(s) may be bargraphs as illustrated in FIGS. 3-5 discussed above and/or other type(s)of graph(s). For example, the graph(s) could include one or more bargraphs, line graphs, scatter plots, pie charts, etc.

The technique of FIG. 7 may further included editing the programmingelement in response to user input. For example, the programming elementmay be edited to improve a performance issue identified in thevisualization model. Additionally, the technique may include displayingan indication of a type of problem with the programming element, and thetechnique may further include an indication of a technique for improvingthe problem by modifying the programming element.

Drilling down into a performance issue may include receiving a userinput selecting a visual element from among a plurality of displayedvisual elements related to the performance issue. In response to thatuser input, the technique can include displaying more information aboutperformance data represented by the visual element than had beendisplayed previously.

Referring to FIG. 8, yet another technique for navigating performancedata from different subsystems will be described. The technique caninclude collecting (810) integrated performance data from a plurality ofdifferent runtime environment subsystems of a computer system while thecomputer system is running a program in the runtime environment. Theruntime environment may be a virtual environment, such as a virtualenvironment that simulates a target environment for which the program isbeing developed. The subsystems can include at least two subsystemsselected from a group consisting of a graphics subsystem, a user codeexecution subsystem, a media decoding subsystem, a networking subsystem,an overall programming environment, and combinations thereof. Avisualization model representing integrated data from the plurality ofsubsystems can be displayed (820). The visualization model can includeone or more data graphs and one or more textual data elements.

A visual query can be received (830) at a region of the data graph(s).The visual query can be limited to the region. In response to the query,an analysis of at least a portion of the integrated data meeting one ormore parameters of the visual query can be performed (850). A list ofone or more performance issues identified in the analysis can bedisplayed (860).

The technique can also include drilling down (870) into a level that isbelow a performance issue of the one or more performance issues inresponse to user input selecting the performance issue from the list.User input can be received (880) in the level below the performanceissue, and the visual element can represent a programming element atleast partially contributing to the performance issue. In response tothe user input at the visual element, the technique can includenavigating (890) to the programming element. Additionally, theprogramming element can be edited (895) in response to user input.

Visual queries can be defined in various ways, such as by selections ongraphs, selections in data set views presented to the user so far in thenavigation stack (including the ones presented in a performancesummary), and/or filters or other queries that are set to be applied torestrict the results and define the actual set of results to be compiledand displayed.

To carry out the visual queries, the analyzers discussed above cananalyze the performance data using the data structures noted above.These data structures can include, for example, the correlation datastructure and a current dataset of performance data, which can includecost data. For example, when user input is provided to request a visualquery, the performance data can be analyzed by an analyzer thatcorresponds to a selection (e.g., a menu selection) made by the userinput. The dataset resulting from that analysis can be provided as theresults of the visual query. The input to the analyzer may include thedataset that has been defined by previous user input selections (theexisting current dataset), and that dataset can be further analyzedusing the correlation data structure. Thus, for example, the analyzermay further restrict the existing current dataset by applying additionalquery restrictions. The technique of applying additional restrictions ina series of visual queries (and a series of analyzers to carry out thosequeries) using the correlation data structure may be continued until anactual programming element is displayed.

The list of selection options such as menu selection options discussedabove (e.g., the menu of selections (360) discussed above with referenceto FIG. 3) can be based on what analyzers are available to carry outsuch selections, because some analyzers may not be configured to operatein some situations. For example, the list of options (e.g., menuselections) can be based on the set of analyzers that can mine andprovide information about a current selection on the displayedvisualization model display (300) based on the history of navigation,the performance data collected, and/or the data structures derived fromthe execution trace.

Although the subject matter has been described in language specific tostructural features and/or methodological acts, it is to be understoodthat the subject matter defined in the appended claims is notnecessarily limited to the specific features or acts described above.Rather, the specific features and acts described above are disclosed asexample forms of implementing the claims.

1. A computer-implemented method, comprising: collecting integratedperformance data from a plurality of different runtime environmentsubsystems of a computer system while the computer system is running aprogram in the runtime environment; displaying a visualization modelrepresenting the integrated data from the plurality of subsystems;receiving a visual query of the integrated data at the visualizationmodel; compiling queried data in response to the visual query; drillingdown into the queried data in response to user input; and in response toa navigation request directed at the visualization model, navigating toa programming element related to a portion of the queried data.
 2. Themethod of claim 1, wherein receiving the visual query comprisesreceiving user input directed at a displayed element of thevisualization model.
 3. The method of claim 1, wherein the visualizationmodel comprises at least one graph representing quantitative performancedata values.
 4. The method of claim 3, wherein the visualization modelfurther comprises at least one textual data element displayed along withthe at least one graph.
 5. The method of claim 1, further comprisingnavigating across the queried data.
 6. The method of claim 1, whereindrilling down into the queried data comprises: receiving user inputdirected at a visual element representing at least a portion of thequeried data; and in response to the user input directed at the visualelement, displaying more information about performance data representedby the visual element than had been displayed previously.
 7. The methodof claim 1, wherein the plurality of subsystems comprise a firstsubsystem selected from a group consisting of a graphics subsystem, auser code execution subsystem, a media decoding subsystem, a networkingsubsystem, an overall programming environment and combinations thereof.8. The method of claim 7, wherein the plurality of subsystems furthercomprise a second subsystem that is different from the first subsystem,the second subsystem selected from the group consisting of a graphicssubsystem, user code execution subsystem, a media decoding subsystem, anetworking subsystem, an overall programming environment andcombinations thereof.
 9. The method of claim 1, wherein the navigationrequest comprises user input selecting a visual element that representsa set of performance data representing resource usage caused at least inpart by the programming element.
 10. The method of claim 1, furthercomprising displaying an indication of a type of problem with theprogramming element.
 11. The method of claim 1, wherein the queried datacomprises a list of one or more performance issues within parametersindicated by the visual query.
 12. One or more computer-readable storagemedia having computer-executable instructions embodied thereon that,when executed by at least one processor, cause the at least oneprocessor to perform acts comprising: collecting integrated performancedata from a plurality of different runtime environment subsystems of acomputer system while the computer system is running a program in theruntime environment; displaying a visualization model representing theintegrated data from the plurality of subsystems; receiving a visualquery at the visualization model; in response to the visual query,performing an analysis of at least a portion of the integratedperformance data that meets one or more parameters of the visual query;displaying a list of one or more performance issues identified in theanalysis; drilling down into a performance issue in response to userinput selecting the performance issue from the displayed list, drillingdown including displaying a representation of a programming elementrelated to the performance issue; and in response to user input directedat the representation of the programming element, navigating to theprogramming element.
 13. The one or more computer-readable storage mediaof claim 12, wherein the visualization model comprises one or more datagraphs.
 14. The one or more computer-readable storage media of claim 13,wherein the visualization model further comprises one or more textualdata elements displayed along with the one or more data graphs.
 15. Theone or more computer-readable storage media of claim 13, whereinreceiving the visual query comprises receiving user input indicating aregion of the one or more data graphs.
 16. The one or morecomputer-readable storage media of claim 12, wherein the acts furthercomprise editing the programming element in response to user input. 17.The one or more computer-readable storage media of claim 12, wherein theacts further comprise displaying an indication of a type of problem withthe programming element.
 18. The one or more computer-readable storagemedia of claim 12, wherein drilling down into one of the one or moreperformance issues comprises: receiving a user input selecting a visualelement from among a plurality of displayed visual elements related tothe performance issue; and in response to the user input selecting thevisual element, displaying more information about performance datarepresented by the visual element than had been displayed previously.19. A computer system comprising: at least one processor; and at leastone memory comprising instructions stored thereon that when executed bythe at least one processor cause the at least one processor to performacts comprising: collecting integrated performance data from a pluralityof different runtime environment subsystems of the computer system whilethe computer system is running a program in the runtime environment, theplurality of subsystems including at least two subsystems selected froma group consisting of a graphics subsystem, a user code executionsubsystem, a media decoding subsystem, a networking subsystem, anoverall programming environment, and combinations thereof; displaying avisualization model representing integrated data from the plurality ofsubsystems, the visualization model comprising one or more data graphsand one or more textual data elements; receiving a visual query at aregion of the one or more data graphs, the visual query being limited tothe region; in response to the query, performing an analysis of at leasta portion of the integrated performance data that meets one or moreparameters of the visual query; displaying a list of one or moreperformance issues identified in the analysis; drilling down into alevel that is below a performance issue of the one or more performanceissues in response to user input selecting the performance issue fromthe list; receiving user input at a visual element in the level belowthe performance issue, the visual element representing a programmingelement at least partially contributing to the performance issue; inresponse to the user input at the visual element, navigating to theprogramming element; and editing the programming element in response touser input.
 20. The computer system of claim 19, wherein the runtimeenvironment is a virtual environment.